package middol.upload

/**
* @Description:    上传文件工厂类
* @Author:         zhangjiayu@middol.com
* @CreateDate:     2020/10/22 9:46
* @Version:        1.0
*/
class UploadHandlerFactory {
    static Map<String, IUploadHandler> uploadHandlerList

    static {
        uploadHandlerList = UploadHandlerContainer.getUploadFileMap()
    }

    static IUploadHandler getUploadHandler(String type){
        uploadHandlerList.find {k,v->
            v.name?.toUpperCase() == type?.toUpperCase()
        }?.getValue()
    }
}
